1. Field of the Invention
The present invention relates to a memory management technique in an image processing apparatus employing a virtual memory system.
2. Description of the Related Art
An information processing apparatus and an image processing apparatus which employ a virtual memory system can manage a memory region (address space) with a capacity which is greater than that of a real memory (physical memory).
When the memory region which is greater than the real memory capacity is managed by the virtual memory system, swap processing is performed in which some of the data and programs stored in the memory are temporarily saved to a storage device such as a hard disk drive (HDD). Swap processing can be broadly divided into the following two kinds of processing. One is “swapping out”, which refers to writing currently contents not currently being used in the real memory to the HDD or the like to free up the real memory. The other is “swapping in”, in which the saved contents written on the hard disk etc. are written back into the memory when such contents are to be used to process a program.
When swapped out contents in a storage region of the HDD are to be transferred back to the real memory region to be used by a central processing unit (CPU), transfer overhead may occur in a process using the swapped memory, and the operation of the program may be slowed.
To improve throughput of an entire computer system, a technique is known in which swap priority of a process which is partially swapped out is set higher than that of a currently-executed process (Japanese Patent Application Laid-Open No. 2004-227188).
Further, a function which protects a specific memory region from being swapped is provided in a general-purpose operating system (OS) such as Linux®.
Functions of image processing apparatuses, such as a multifunction peripheral (MFP) which includes a plurality of functions such as copying, printing, scanning, and faxing, are being diversified each year. Thus, the amount of programs (processes) installed on the MFP to realize such plurality of functions also continues to increase. Installing a real memory which secures a memory region with a capacity large enough to avoid occurrence of swapping when the MFP simultaneously executes processes may not be practical from a cost perspective. Therefore, an operation may have to be performed by swapping out the memory used by some of the processes.
However, in an MFP having various functions such as scanning, printing, copying, and faxing, the process having the higher execution priority may change depending on a use environment.
For example, if an MFP in which a printing function is prioritized over other functions and a memory region relating thereto is restricted to prevent swapping, is used by a user who mainly uses a scanning function, an operation of a program for controlling the scanning function may be slowed such that scanning function throughput decreases. Similarly, an improvement in throughput would not be expected for an environment in which a facsimile sending function is mainly used.
Therefore, a system having a wide range of functions cannot improve throughput by uniformly determining a priority function.